package org.cug.anno;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import org.cug.validation.StateValidation;

import java.lang.annotation.*;

/**
 * @Author: gongshihao
 * @Date: 2024-05-15-15:31
 * @Description: this is my code
 */
@Documented
@Constraint(validatedBy = {StateValidation.class})
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface State {
    //提供校验失败后的提示信息
    String message() default "state参数的值智能是已发布或者草稿";
    //指定分组
    Class<?>[] groups() default {};
    //负载 获得State注解的附加信息
    Class<? extends Payload>[] payload() default {};
}
